#ifndef GAMEELEMENT_H
#define GAMEELEMENT_H

#include <cstdlib>
#include <iostream>
#include <ctime>

#include <boost/smart_ptr.hpp>
using boost::scoped_ptr;
using boost::shared_ptr;

#include "Globals.h"

/*! \class GameElement
 *  \brief Captures the components of the game that are interacted with.
 *
 *  The components, which are the game elements include: soil, arrow, rock and
 *  the life forms such as dig dug and the monsters
 *
 *  The class stores the x and y coordinates, the direction where applicable and
 *  the ID of the element.
 *  It is inherited by the classes representing the above mentioned elements
 *  and has member functions that return the coordinates, direction and ID.
 *
 *  \author Jackline Atsango
 *  \author Jean pierre vieira Pereira
 *  \version 3
 *  \date 26 September 2012
 */

class GameElement
{
    public:

/*! \fn GameElement
 *  \brief create a GameElement object
 */
        GameElement();

/*! \fn void initialise
 *  \brief set the starting coordinate, direction and ID.
 */
        void initialise(int pos_x, int pos_y,int direction_x, int direction_y, int ID);

/*! \fn int get_pos_x
 *  \returns integer x position
 */
        int get_pos_x();

/*! \fn int get_pos_y
 *  \returns integer y position
 */
        int get_pos_y();

/*! \fn void set_pos_x
 *  \param pos_x set desired x coordinate
 */
        void set_pos_x(int pos_x);

/*! \fn void set_pos_y
 *  \param pos_y set desired y coordinate
 */
        void set_pos_y(int pos_y);

/*! \fn int get_direction_x
 *  \returns integer x direction
 */
        int get_direction_x();

/*! \fn int get_direction_y
 *  \returns integer y direction
 */
        int get_direction_y();

/*! \fn int get_face_direction
 *  \returns integer enumeration number for UP, DOWN, LEFT or RIGHT
 */
        int get_face_direction();

/*! \fn int get_ID
 *  \returns integer enumeration number of element ID
 */
        int get_ID();

/*! \fn int get_alive
 *  \returns bool dead or alive status
 */
        bool get_alive();

/*! \fn void set_alive
 *  \brief set the object to be alive(true) when initialised or dead(false) when there
 *  is a collision.
 *  \param life_status boolean for alive or dead
 *  \return void
 */
        void set_alive(bool life_status);

    protected:
        int _pos_x;
        int _pos_y;

        int _direction_x;
        int _direction_y;

    private:
        int _face_direction;

        int _ID;
        bool _alive;
};

#endif // GAMEELEMENT_H
